#include "Common.h"
#include "GameEnemy.h"
#ifndef __GAMEENERMY_PLAN_H__
#define  __GAMEENERMY_PLAN_H__

template<>
class GameEnemy<EE_Plane> : public GameSprite
{
public:
	static const EEnemy EnemyType = EE_Plane;

public:
	void doAI()
	{
		CCPoint pt = getPosition();
		if (dir > 0)
		{
			if (pt.y < 100)
			{
				dir = -1;
			}
			setPosition(ccp(pt.x - 10, pt.y - 3));
		}
		else
		{
			if (pt.y > 400)
			{
				dir = 1;
			}
			setPosition(ccp(pt.x - 10, pt.y + 3));
		}
	}
private:
	int dir;

};

#endif //